As a reading apparatus of a two-dimensional code, scanning laser light vertically and laterally by a reflector or the like to move the detecting position two-dimensionally, and reading out a substantially two-dimensional code data is known. In such an apparatus, however, because of the structure of scanning the reflector at high speed, problems occur in maintenance and precision.
Also a reading apparatus of a two-dimensional code data may take a paper recording two-dimensional code data with a camera, and read the area. However, due to a peripheral error of the camera or if the reading diagonal angle is not at a right angle to the recorded two-dimensional code, an optical error occurs in image processing. The correction algorithm for image processing of the two-dimensional code data is complicated, and the memory capacity for image processing is increased, thereby increasing the price of the reading apparatus.
Accordingly, by using a line sensor and moving the detecting position so that the relative moving direction of the two-dimensional code data and the line sensor may be in the orthogonal direction, optical errors due to the camera may be solved. As shown in FIG. 8, when processing the image of two-dimensional code data by optical means M such as a lens and mirror, since the distances of optical ray paths L.sub.1 and L.sub.2 are not equal to each other, a constitution may be considered to vary the positional relation of the detection ray from the paper A recording two-dimensional code data and the incident ray to a line sensor element 1.
That is, since the optical detection angle varies, when the total length of the detection ray and incident ray to the sensor element varies depending on the optical means M, a difference is caused between the distance of ray path L.sub.1 and distance of ray path L.sub.2, thereby producing a difference between the distance of ray path L.sub.1 and distance of ray path L.sub.2 of the data region, and therefore the size and width of the data region are no longer uniform, which requires correction of data of the two-dimensional data code entering the memory for image processing.
The invention is intended to solve the problems in maintenance and precision in the method of reading two-dimensional data and performing image processing of two-dimensional code data by a simple algorithm, by moving the detecting position so that the relative moving direction of the paper recording the two-dimensional code data and a line sensor is in the orthogonal direction, and entering the image data in the memory in two dimensions.